package cn.togeek.generate.api.model;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author hanle
 * @email hanl1946@163.com
 * @date 2020-08-11 23:54:40
 */
@Data
public class PageDTO {

   @NotNull(message = "当前页不能为空")
   @Min(value = 1, message = "当前页数必须大于等于1")
   private Integer page;

   @NotNull(message = "每页条数不能为空")
   @Min(value = 1, message = "每页条数必须大于等于1")
   @Max(value = 500, message = "每页条数不能超过500")
   private Integer limit;

   private String field;

   private Integer desc;
}
